package com.gmail.huxiaowi.cblog.dao.impl.jdo;

import java.util.Collection;

import com.gmail.huxiaowi.cblog.dao.ICommentDao;
import com.gmail.huxiaowi.cblog.entity.Comment;
import com.gmail.huxiaowi.cblog.entity.Message;

/**
 * Class CommentDaoJDOImpl
 * 
 * @author  huxw
 * @version $Revision:1.0.0, $Date:2010-4-29 下午05:46:06$
 */
public class CommentDaoJDOImpl extends GenericDaoJDOImpl<Comment> implements ICommentDao{

    /* (non-Javadoc)
     * @see com.gmail.huxiaowi.cblog.dao.CommentDao#queryByMessage(com.gmail.huxiaowi.cblog.entity.Message)
     */
    @SuppressWarnings("unchecked")
    public Collection<Comment> queryByMessage(Message message) {
        // TODO Auto-generated method stub
        return super.jt.find("SELECT FROM com.gmail.huxiaowi.cblog.entity.Comment WHERE messageId==:messageId", new Object[]{message.getId()});
    }

}
